package org.example;

import org.example.filter.AbstractClass;
import org.example.filter.Employee;
import org.springframework.format.Printer;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
//        System.out.println( "Hello World!" );
//        List<String> list = List.of("java","python","C++","C");
//        System.out.println(list);
//        List<Integer> number = Arrays.asList(1,24,5,67,54,32,11,12);
//        List<Integer> eventNumber = number.stream().filter(n -> n%2 == 0).collect(Collectors.toList());
//        System.out.println(eventNumber);
//        List<Employee> employees = Arrays.asList(new Employee("Alice",2100),new Employee("Emerson",6000),new Employee("Dean",9000),new Employee("Sonny",1000));
//        List<Employee> wagesAboveAverage = employees.stream().filter(e -> e.getSalary() > 2000).collect(Collectors.toList());
//        System.out.println(wagesAboveAverage);
//        System.out.println("工资大于两千的人：");
//        wagesAboveAverage.forEach(t -> System.out.println(t.getName()));
//        AbstractClass abstractClass = (a,b)->a+b;
//        System.out.println(abstractClass.sumNumber(21,34.32));
    }
}